During the reduction process,the oxide of a metal decomposes and the reducing agent removes the oxygen. The role of the reducing agent is to provide a $\Delta_{r} G^{\ominus}$ value that is negative and large enough to make the sum of $\Delta_{r} G^{\ominus}$ of the two reactions (oxidation of the reducing agent and reduction of the metal oxide) negative.
$M_{x}O_{(s)} \rightarrow xM_{(s \text{ or } l)} + \frac{1}{2}O_{2(g)}$ ; $\Delta_{r} G^{\ominus}(M_{x}O, M)$ $... (i)$
If reduction is carried out by carbon,the oxidation of the reducing agent $(C)$ occurs:
$C_{(s)} + \frac{1}{2}O_{2(g)} \rightarrow CO_{(g)}$ ; $\Delta_{r} G^{\ominus}(C, CO)$ $... (ii)$
Alternatively,the complete oxidation of carbon to carbon dioxide may take place:
$\frac{1}{2}C_{(s)} + \frac{1}{2}O_{2(g)} \rightarrow \frac{1}{2}CO_{2(g)}$ ; $\frac{1}{2}\Delta_{r} G^{\ominus}(C, CO_{2})$ $... (iii)$
On coupling reactions $(i)$ and $(ii)$,we get:
$M_{x}O_{(s)} + C_{(s)} \rightarrow xM_{(s \text{ or } l)} + CO_{(g)}$ $... (iv)$
On coupling reactions $(i)$ and $(iii)$,we have:
$M_{x}O_{(s)} + \frac{1}{2}C_{(s)} \rightarrow xM_{(s \text{ or } l)} + \frac{1}{2}CO_{2(g)}$ $... (v)$
Similarly,if carbon monoxide is the reducing agent,it is oxidized as follows:
$CO_{(g)} + \frac{1}{2}O_{2(g)} \rightarrow CO_{2(g)}$ ; $\Delta_{r} G^{\ominus}(CO, CO_{2})$ $... (vi)$
On coupling reactions $(i)$ and $(vi)$,we have:
$M_{x}O_{(s)} + CO_{(g)} \rightarrow xM_{(s \text{ or } l)} + CO_{2(g)}$ $... (vii)$
The reactions $(iv)$ and $(vii)$ describe the reduction of metal oxide $M_{x}O$. The temperature chosen must be such that the $\Delta_{r} G^{\ominus}$ for the combined redox process is negative. This is indicated by the intersection point of the two curves in the Ellingham diagram. After that point,the $\Delta_{r} G^{\ominus}$ becomes sufficiently negative to make the reduction of $M_{x}O$ feasible.